import request from '@/utils/request'

// 查询外协检验单列表
export function listOsqc(query) {
  return request({
    url: '/mes/qc/osqc/list',
    method: 'get',
    params: query
  })
}

// 查询外协检验单详细
export function getOsqc(osqcId) {
  return request({
    url: '/mes/qc/osqc/' + osqcId,
    method: 'get'
  })
}

// 新增外协检验单
export function addOsqc(data) {
  return request({
    url: '/mes/qc/osqc',
    method: 'post',
    data: data
  })
}

// 修改外协检验单
export function updateOsqc(data) {
  return request({
    url: '/mes/qc/osqc',
    method: 'put',
    data: data
  })
}

// 删除外协检验单
export function delOsqc(iqcId) {
  return request({
    url: '/mes/qc/osqc/' + iqcId,
    method: 'delete'
  })
}
// 根据来源查询外协检验单
export function getOsqcBySource(query) {
  return request({
    url: '/mes/qc/osqc/getOsqcBySource',
    method: 'get',
    params: query
  })
}
//免检
export function exemptOsqc(data) {
  return request({
    url: '/mes/qc/osqc/exempt',
    method: 'put',
    data: data
  })
}
